package com.gupao.observerdemo.observer.subject;

import com.gupao.observerdemo.observer.core.EventListener;
import lombok.extern.slf4j.Slf4j;


/**
 * 被观察者
 * 发生改变，观察者便会收到通知
 */
@Slf4j
public class Subject extends EventListener {

    public void add(){
        log.info("被观察者执行add方法");
        trigger(SubjectEventType.ON_ADD);
    }


    public void remove(){
        log.info("被观察者执行remove方法");
    }
}
